1. Field of the Invention
Embodiments of the present invention generally relate to scheduling command stream processing, and more particularly to distributing commands to a variety of consumers.
2. Description of the Related Art
Conventional command stream scheduling allocates a specific amount of time, a time slice, to each consumer during which the consumer receives commands from a command stream scheduler. When the time slice for a consumer expires, the command stream scheduler switches contexts, thereby selecting another command stream and outputs the other command stream to another consumer. When this time sharing scheme is used, the amount of processing represented by the commands a consumer receives may cause processing inefficiencies.
For example, a first consumer may receive a small number of commands that initiate many cycles of processing. During the processing cycles, the first consumer cannot accept additional commands. The scheduler must then wait for either the first consumer to begin accepting commands or for the time slice to expire. In contrast, a second consumer may receive several commands during a time slice, but not receive a command which initiates processing. Therefore, the second consumer remains idle until a subsequent time slice when the second consumer receives a command to initiate processing. Although the time slice allocation scheme may be “fair” it may not be well matched to the processing characteristics of each consumer. Therefore, some consumers may be idle while other consumers are overwhelmed, limiting processing concurrency.
Accordingly, there is a need to schedule command stream processing to achieve greater processing concurrency and improve overall command stream throughput.